package com.yan.demo.demo6;

import java.util.ArrayList;

public class Demo6 {
    public static void main(String[] args) {
        ArrayList<Student>list = new ArrayList<>();
        StudentTool studentTool = new StudentTool();
        list.add(new Student("黄渤" , 20 , 70));
        list.add(new Student("孙红雷" , 22 , 59));
        list.add(new Student("章子怡" , 18 , 40));
        list.add(new Student("杨颖" , 19 , 80));
        list.add(new Student("撒贝宁" , 21 , 90));
        studentTool.lisStudents(list);
        int maxScore = studentTool.getMaxScore(list);
        System.out.println("maxScore = " + maxScore);
        Student maxStudent = studentTool.getMaxStudent(list);
        System.out.println("maxStudent = " + maxStudent);
        int averageScore = studentTool.getAverageScore(list);
        System.out.println("averageScore = " + averageScore);
        int count = studentTool.getCount(list);
        System.out.println("count = " + count);
    }
}
